<template>
	你好啊 这里是ComponentA
</template>

<script>
	export default {
	  beforeRouteLeave(to, from, next) {
	    console.log('1. A.beforeRouteLeave')
	    next() // 必须调用 next() 继续导航
	  },
	  beforeUnmount() {
	    console.log('2. A.beforeUnmount')
	  },
	  deactivated() {
	    console.log('3. A.deactivated (if kept alive)')
	  },
	  unmounted() {
	    console.log('4. A.unmounted')
	  }
	}
</script>

<style>
</style>